Skip to content

Change “latest” docker image tags#21

Merged
marek-saji merged 2 commits intov1from
fix/release
Aug 5, 2025
Merged

Change “latest” docker image tags#21
marek-saji merged 2 commits intov1from
fix/release

Conversation

@marek-saji
Copy link
Contributor

@marek-saji marek-saji commented Jul 30, 2025

Why?

We used release tag for last build on main, which was a mistake and confusing.

What?

New convention is:

  • edge for latest built from main branch
  • latest for latest released (versioned) one; unless it’s a pre–release

Also drops GOOGLE_ARTIFACT_REGISTRY_DEFAULT_TAG in favour of hard–coding
these tags to force uniformity across projects.

@marek-saji marek-saji self-assigned this Jul 30, 2025
- `edge` for latest built from main branch
- `latest` for latest released (versioned) one;
  unless it’s a pre–release
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 30, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Refactor

    • Improved consistency in workflow files by updating quotation marks in input and output descriptions.
    • Enhanced version tag parsing logic for Docker release images, ensuring more accurate handling of pre-release versions and metadata.
    • Minor cleanup of whitespace for better readability.
  • Chores

    • Removed an unused environment variable from the Docker image release workflow.

Walkthrough

The changes update two GitHub Actions workflow YAML files. The first file standardizes quote usage and whitespace formatting without altering logic. The second file refines version parsing logic, introduces pre-release detection, updates tagging behavior, and removes an unused environment variable, alongside minor formatting improvements.

Changes

Cohort / File(s) Change Summary
Workflow Formatting and Quotes
.github/workflows/reusable-release.yml
Standardized single quotes for input/output descriptions, adjusted whitespace in embedded JavaScript, and added a newline at the end of the file. No logic or control flow changes.
Version Tagging Logic and Pre-release Detection
.github/workflows/reusable-tag-docker-release-images.yml
Changed input description quotes, updated version parsing logic to use regex for leading 'v', introduced pre-release detection, revised tag generation to only include 'latest' for non-pre-releases, removed an unused environment variable, and performed minor whitespace cleanup. No changes to exported/public interfaces.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny hops through YAML fields,
Swapping quotes, the code now yields.
Tagging versions, sniffing out pre-release,
Regex whiskers, whitespace peace.
"Latest" only for the stable crowd—
The carrot of clarity makes us proud!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/release

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8410e6a and ed2464e.

📒 Files selected for processing (2)
  • .github/workflows/reusable-release.yml (3 hunks)
  • .github/workflows/reusable-tag-docker-release-images.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: marek-saji
PR: verkstedt/actions#20
File: .github/workflows/docker-build-push.yaml:240-242
Timestamp: 2025-07-22T11:18:25.853Z
Learning: In GitHub Actions Docker build workflows, referencing non-existent step outputs in the tags field of docker/build-push-action@v6 does not cause build failures - the action handles missing tag references gracefully.
Learnt from: marek-saji
PR: verkstedt/actions#20
File: .github/workflows/create-release-pr.yaml:64-67
Timestamp: 2025-07-22T11:11:35.634Z
Learning: In GitHub Actions workflows, `${{ toJson(inputs.release_type) }}` interpolation happens before JavaScript parsing. For string inputs, toJson() produces quoted strings that become valid JavaScript string literals (e.g., `const releaseType = "patch";`), so switch statements work correctly with case branches like `case 'patch':`.
Learnt from: marek-saji
PR: verkstedt/actions#20
File: .github/workflows/docker-build-push.yaml:128-161
Timestamp: 2025-07-22T12:27:24.399Z
Learning: GitHub Actions runs shell scripts with `bash --noprofile --norc -eo pipefail {0}` by default, which provides exit-on-error (-e) and pipeline-failure-detection (-o pipefail) flags, making additional `set -euo pipefail` unnecessary in workflow scripts.
Learnt from: marek-saji
PR: verkstedt/actions#20
File: .github/workflows/docker-build-push.yaml:236-255
Timestamp: 2025-07-22T12:12:09.068Z
Learning: In GitHub Actions Docker workflows, intentionally using separate docker/build-push-action steps (one with push: false for building, followed by another with push: true) can be a deliberate design choice to provide timing visibility and show how much time is spent on each phase, rather than being a performance oversight.
.github/workflows/reusable-release.yml (1)

Learnt from: marek-saji
PR: #20
File: .github/workflows/create-release-pr.yaml:64-67
Timestamp: 2025-07-22T11:11:35.634Z
Learning: In GitHub Actions workflows, ${{ toJson(inputs.release_type) }} interpolation happens before JavaScript parsing. For string inputs, toJson() produces quoted strings that become valid JavaScript string literals (e.g., const releaseType = "patch";), so switch statements work correctly with case branches like case 'patch':.

.github/workflows/reusable-tag-docker-release-images.yml (2)

Learnt from: marek-saji
PR: #20
File: .github/workflows/docker-build-push.yaml:240-242
Timestamp: 2025-07-22T11:18:25.853Z
Learning: In GitHub Actions Docker build workflows, referencing non-existent step outputs in the tags field of docker/build-push-action@v6 does not cause build failures - the action handles missing tag references gracefully.

Learnt from: marek-saji
PR: #20
File: .github/workflows/create-release-pr.yaml:64-67
Timestamp: 2025-07-22T11:11:35.634Z
Learning: In GitHub Actions workflows, ${{ toJson(inputs.release_type) }} interpolation happens before JavaScript parsing. For string inputs, toJson() produces quoted strings that become valid JavaScript string literals (e.g., const releaseType = "patch";), so switch statements work correctly with case branches like case 'patch':.

🔇 Additional comments (3)
.github/workflows/reusable-tag-docker-release-images.yml (2)

64-66: Good move to use anchored regex for stripping the leading v.

The previous naive replacement risked deleting the first internal v as well, so this change is spot-on.


75-77: 👍 Skip latest for pre-releases.

The latest pointer no longer advances for -rc/-beta versions, avoiding accidental upgrades in production pulls. Nice touch.

.github/workflows/reusable-release.yml (1)

6-12: Quote-style change only – no functional impact.

The switch to single quotes keeps description strings consistent across workflows.

@marek-saji marek-saji requested a review from erolci July 30, 2025 09:41
@marek-saji marek-saji merged commit 38f8597 into v1 Aug 5, 2025
1 check passed
@marek-saji marek-saji deleted the fix/release branch August 5, 2025 10:30
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants